﻿using System;
using System.CodeDom.Compiler;

namespace FBGraph.ClientGenerator.CodeGen
{
    public class NamedArgument : Argument
    {
        public NamedArgument(String name, Object value)
            : base(value)
        {
            this.Name = name;
        }

        public String Name { get; set; }

        public override void Write(CodeGenWriter writer)
        {
            writer.Write("{0} = {2}{1}{2}", this.Name, this.Value, this.Value is String ? "\"" : String.Empty);
        }
    }
}
